package com.financing.wap.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.financing.wap.dao.IPaymentErrormsgDao;
import com.financing.wap.dto.PaymentErrormsgDTO;
import com.financing.wap.service.IPaymentErrormsgService;

@Service("paymentErrormsgService")
public class PaymentErrormsgServiceImpl implements IPaymentErrormsgService{

	@Autowired
	private IPaymentErrormsgDao paymentErrormsgDao;

	@Override
	public PaymentErrormsgDTO getPaymentErrormsg(
			PaymentErrormsgDTO paymentErrormsg) {
		return paymentErrormsgDao.getPaymentErrormsg(paymentErrormsg);
	}

	@Override
	public String queryErrorMsgByErrorCodeAndPayplat(String pay3platBaofoo,
			String code) {
		PaymentErrormsgDTO paymentErrormsg = new PaymentErrormsgDTO();
		paymentErrormsg.setError_code(code);
		paymentErrormsg.setPay_plat(pay3platBaofoo);
		paymentErrormsg = paymentErrormsgDao.getPaymentErrormsg(paymentErrormsg);
		return  paymentErrormsg == null?null:paymentErrormsg.getUnify_error_msg();
	}



}
